<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller as BaseController;
use App\Repository\Orders\OrdersTransferRepository as model;
use Illuminate\Http\Request;

// 定单流转
class OrdersTransferController extends BaseController
{
    private $repoist = null;

    public function __construct(model $model)
    {
        $this->repoist = $model;

    }

    public function logs(Request $request)
    {
        if (empty($request->id)) {
            return $this->returnMsg(101, '请指定定单');
        }
        $data = $this->repoist->logs($request->id, $request->get('pageNum'), $request->get('pageSize'));
        $data['transferStatus'] = config('card.transferStatus');
        return $data;
    }

    public function dispose(Request $request)
    {
        $postData = $request->all();
        return $this->repoist->dispose($postData);
    }

    public function store(Request $request)
    {
        $postData = $request->all();
        return $this->repoist->add($postData);
    }


}
